liwe.form.instance.prototype.uploader = function ( vars )
{
	vars [ 'os3_class_value' ] = '';

	this._start_field ( vars );

	var upl = new WWL.uploader ( vars [ 'name' ] );

	upl.type = vars.get ( "type", 0 );
	upl.button_class = vars.get ( "button_class", '' );

	this.html += upl.to_string ();

	this._widgets [ vars [ 'name' ] ] = upl;

	this._newline ( vars );

	this.events [ 'submit' ] = function ( form_fields, action, cback )
	{
		if ( upl._is_html5 )
		{
			upl._do_post ( form_fields, action, cback );
		}
		else
		{
			upl.cbacks [ 'complete' ] = cback;

			console.debug ( "CUSTOM SUBMIT: %s", action );
			var p = upl._get_player ();

			form_fields.iterate ( function ( v, k ) { if ( k ) p.setArg ( k, v ); } );
			p.setURL ( action );
			p.send ();
		}
	};

	upl.get_value = function ()
	{
		return "uploader";
	};

	upl._get_player = function ()
	{
		var obj = null;
        	if ( navigator.appName.indexOf ( "Microsoft" ) != -1) 
             		obj = window [ "swf:" + upl.id ];

		if ( obj ) return obj;

        	return document [ "swf:" + upl.id ];
	};
};
